package cn.tedu.cn.tedu.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope// 支持动态刷新
@RestController
@Slf4j //日志
public class TestNacosConfigController {

    @Value("${logging.level.cn.tedu: info}")
    private String level;
    @RequestMapping("/doGetLogLevel")
    public String doGetLogLevel(){
        log.debug("debug:"+level);
        log.error("error:"+level);
        return level;
    }
}
